﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QD.Snapshot.Core.Config;

namespace QD.Snapshot.Core.BLL
{
    public class Product
    {
        /// <summary>
        /// 更新时间
        /// </summary>
        /// <param name="copyform"></param>
        /// <param name="ids"></param>
        /// <returns></returns>
        public static int UpdateTime(string copyform, string ids, string article_ids)
        {
            return DAL.Product.UpdateTime(copyform, ids, article_ids);
        }

        public static List<Model.Product> GetList(string copyform)
        {
            //0 百度,1 360, 2 搜狗,3 bing, 4中国搜索, 5 搜狗微信
            int columnid = copyform == "5" ? 1 : 2;
            return DAL.Product.GetList(columnid, copyform, SiteConfig.PageSize, SiteConfig.UserId, SiteConfig.Cycle);
        }

        public static int UpdateSnap(Model.Snap model)
        {
            model.state = 1;
            model.html = "";

            return DAL.Snap.UpdateByMack(model);
        }
    }
}
